import UserItem from "../operateItem/User";
import GroupItem from "../operateItem/Group";
import AddUserItem from "../operateItem/AddUser";
import AddGroupItem from "../operateItem/AddGroup";
import GroupOperateItem from "../operateItem/GroupOperate";
import "./index.less";

function ChatContent(props: any) {
  const { content } = props;
  return (
    <>
      <div className="chat-content group-main-content">
        <div className="title-content chat-content-title">
          <p>{content.type === "addUser" ? "添加好友" : ""}</p>
        </div>
        {content.type === "addUser" && <AddUserItem />}
        {content.type === "user" && <UserItem id={content.id}/>}
        {content.type === "addGroup" && <AddGroupItem />}
        {content.type === "group" && <GroupItem id={content.id}/>}
        {/* 分组 */}
        {content.type === "groupOperate" && <GroupOperateItem />}
      </div>
    </>
  );
}

export default ChatContent;
